﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ReviewCurveApp.Classes;
using System.Data;

namespace ReviewCurveApp.Contorller
{
    public class SubjectLoader
    {
        internal List<Subject> Load()
        {
            List<Subject> subjects = new List<Subject>();

            //DataTable dt = DBLoader.LoadSubjects();

            //subjects.Add(GetSubject());

            return subjects;
        }

        private Subject GetSubject()
        {
            Subject subject = new Subject();
            subject.Id = 1;
            subject.Name = "Test";
            for (int i = 0; i < 20; i++)
            {
                subject.Units.Add(GetUnit(i));
            }
            
            return subject;
        }

        private Unit GetUnit(int Id)
        {
            Unit unit = new Unit();

            unit.Id = Id;
            
            unit.Name = "unit-" + Id.ToString();
            
            unit.Status = UnitStatus.Initiled;
            
            return unit;
        }
    }
}
